import 'dart:ffi';

// import 'package:dartbin/quickjs_binding.dart';

void main() {
  // final dylib = DynamicLibrary.open(
  //     '../../quickjs-2023-12-09/build/macosx/x86_64/release/libqjs.dylib');
  // final _ = QuickJS(dylib);
  // final _rt = _.JS_NewRuntime();
  // final _ctx = _.JS_NewContext(_rt);
  // final code = '''console.log('running in quickjs')''';
  // final flag = JS_EVAL_FLAG_STRICT;
  // final input = code.toNativeUtf8().cast<Char>();
  // final name = "main".toNativeUtf8().cast<Char>();
  // final inputLen = 1;
  // final ret = _.JS_Eval(_ctx, input, inputLen, name, flag);
  // calloc.free(input);
  // calloc.free(name);

  // _.js_std_loop(_ctx);
  // _.js_free(_ctx, ret as Pointer<Void>);
}

int getPtrCharLen(Pointer<Char> input) {
  return 1;
}
